package com.ymatou.iapi.productmanager.service.old;


import java.util.Arrays;
import java.util.Map;

import org.json.JSONObject;

import com.ymatou.iapi.productmanager.parameter.QuerySellerProductBean;
import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.compare.CallAPI;

public class QuerySellerProductListCall extends YmatouAutoTestCall  implements CallAPI{
	private static String opurl ="api/SellerProduct/QuerySellerProductList";
	
	public QuerySellerProductListCall() {
		super(EnvSetup.getSystemUrl("productmanager"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}

	
	public static void main(String[] args){
		new QuerySellerProductListCall().callAndGetReturnData();
	}
	@Override
	public JSONObject callAndReturn(Map<String, Object> paramMap) {
		QuerySellerProductBean querySellerProductBean =  new QuerySellerProductBean();
		querySellerProductBean.setProductIdList(Arrays.asList(paramMap.get("productId").toString()));
		querySellerProductBean.setSellerId(Integer.parseInt(paramMap.get("sellerId").toString()));
		return callAndGetReturnData(querySellerProductBean);
	}
	@Override
	public String getApiName() {
		return "QuerySellerProductList";
	}
}